package com.gome.wechat.program.service.impl;

import com.gome.wechat.program.dao.UserHobbyTagRepo;
import com.gome.wechat.program.entity.UserHobbyTag;
import com.gome.wechat.program.service.UserHobbyTagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by liwei113 on 2017/11/1 0001.
 */
@Service
public class UserHobbyTagServiceImpl implements UserHobbyTagService {

    @Autowired
    UserHobbyTagRepo userHobbyTagRepo;

    @Override
    public List<UserHobbyTag> saveList(List<UserHobbyTag> userHobbyTags) {
        return userHobbyTagRepo.save(userHobbyTags);
    }

    @Override
    public void deleteByUserId(Long userId) {
        userHobbyTagRepo.deleteByUserId(userId);
    }

    @Override
    public List<UserHobbyTag> findByUserId(Long userId) {
        return userHobbyTagRepo.findByUserId(userId);
    }
}
